package getsmart.project.activity;

import getsmart.project.R;
import getsmart.project.database.DBProfil;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import android.content.Intent;
import android.widget.EditText;

public class AddProfil extends Activity{

	EditText profileName;
	Button b1;
	public static String namaProfil = "";
	private static void getNamaProfil(String data){
		AddProfil.namaProfil = data;
	}
	@Override
	public void onCreate(Bundle as){
		super.onCreate(as);
		setContentView(R.layout.add_profil);
		
		b1 =(Button) findViewById(R.id.btnAddProfil);
		profileName = (EditText)findViewById(R.id.txtAddProfil);
		b1.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				if(profileName.getText().toString().equals("")){
					Toast.makeText(getBaseContext(), "Tolong isi nama profil anda " ,
							Toast.LENGTH_LONG).show();
				}
				else{
					namaProfil = profileName.getText().toString();
					Intent i = new Intent(AddProfil.this,ChooseKelas.class);
					startActivity(i);
				}
			}
		});
	}
	
}
